{extend name="pub/base2" /}
{block name="title"}
<title>章节修改</title>
{/block}

{block name="body"}
<article class="clearfix pd-20">
    <form action="edit" method="post" class="form form-horizontal" enctype="multipart/form-data">
        <input type="hidden" name="id" value="{$chapter.id}">
        <input type="hidden" value="{$chapter.book_id}" name="book_id">
        <div class="row clearfix">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>章节名：</label>
            <div class="formControls col-xs-4 col-sm-3">
                <input type="text" class="input-text" value="{$chapter.chapter_name}" name="chapter_name">
            </div>
        </div>

        <div class="row clearfix">
            <label class="form-label col-xs-4 col-sm-3">章节序</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="{$chapter.chapter_order}" name="chapter_order">
            </div>
        </div>

        <div class="row clearfix">
            <label class="form-label col-xs-4 col-sm-3">内容文件：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="file" name="content" class="input-text">
            </div>
        </div>

        <div class="row clearfix">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
            </div>
        </div>
    </form>
</article>

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript">
    $(function(){
        $("form").validate({
            rules:{
                chapter_name:{
                    required:true,
                    minlength:1,
                    maxlength:50
                },
                chapter_order:{
                    required:true,
                    number: true
                }
            },
            onkeyup:false,
            focusCleanup:true,
            success:"valid"
        });
    });
</script>
<!--/请在上方写此页面业务相关的脚本-->
{/block}
</html>